/*
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
*/
package cmd

import (
	"github.com/spf13/cobra"
	"os"
)

const commandLineName = "cloud-syncer"

var rootCmd = &cobra.Command{
	Use:   commandLineName,
	Short: `将本地文件同步到云存储`,
}

func init() {
	rootCmd.Root().CompletionOptions.DisableDefaultCmd = true
}

func Execute() {
	rootCmd.SetHelpCommand(&cobra.Command{
		Use:    "help",
		Short:  "查看帮助信息",
		Hidden: true,
	})
	err := rootCmd.Execute()
	if err != nil {
		os.Exit(1)
	}
}
